package com.cy.pj.sys.service.impl;

import com.cy.pj.sys.dao.SysAttendanceDao;
import com.cy.pj.sys.pojo.SysAttendance;
import com.cy.pj.sys.service.SysAttendanceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SysAttendanceServiceImpl implements SysAttendanceService {
    @Autowired
    private SysAttendanceDao sysAttendanceDao;

    @Override
    public List<SysAttendance> findAttendance() {
        return sysAttendanceDao.selectAttendance();
    }

    @Override
    public SysAttendance findById(Long id) {
        return sysAttendanceDao.selectById(id);
    }

    @Override
    public int deleteById(Integer id) {
        return sysAttendanceDao.deleteById(id);
    }

    @Override
    public int updateAttendance(SysAttendance attendance) {
        return sysAttendanceDao.updateAttendance(attendance);
    }

    @Override
    public int saveAttendance(SysAttendance attendance) {
        return sysAttendanceDao.insertAttendance(attendance);
    }
}
